<template>
	<view class="content">
		<u-navbar title="进货记录传送商城" :placeholder="true" :autoBack="true">
			<view class="u-nav-slot" slot="right" @click="orderbyChange">
				筛选
			</view>
		</u-navbar>
		<fjj-condition ref='condition' @touchmove.stop :color="color" :list="menuList" :defaultValue="defaultValue"
			@result="resultConditon" />
	</view>
</template>

<script>
	import fjjCondition from '@/components/fjj-condition/fjj-condition.vue';
	export default {
		components: {
			fjjCondition,
		},
		data() {
			return {
				color: '#4D7BFE',
				hasChoose: false,
				defaultValue: {
					order_num:'',
					card_num:'',
					time1: ['2021/02/01', '2021/02/03'],
				},
				menuList: [{
						'title': '日期范围',
						'type': 'range',
						'key': 'time1',
						'minName': 'time1MinName',
						'maxName': 'time1MaxName',
					},
					{
						'title': '订单号',
						'type': 'singleinput',
						'key': 'order_num',
						'placeholder':'请输入订单号'
					},
					{
						'title': '卡号',
						'type': 'singleinput',
						'key': 'card_num',
						'placeholder':'请输入卡号'
					}
				]
			}
		},
		onLoad() {

		},
		methods: {
			resultConditon(obj) {
				this.$refs.condition.visibleDrawer = false;
				this.hasChoose = obj.hasChoose;
				console.log(obj);
			},
			orderbyChange(obj) {
				this.$refs.condition.visibleDrawer = true;
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		min-height: 100vh;
		background-image: url('../../../static/home/page-bg.png');
		background-repeat: no-repeat;
		background-size: 100% 100%;

		.u-nav-slot {
			font-size: 26rpx;
		}
	}
</style>